home *** CD-ROM | disk | FTP | other *** search
- // zdemovw.cpp : implementation of the CZdemoView class
- //
-
- #include "stdafx.h"
- #include "zdemo.h"
-
- #include "zdemodoc.h"
- #include "zdemovw.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // CZdemoView
-
- IMPLEMENT_DYNCREATE(CZdemoView, CFormView)
-
- BEGIN_MESSAGE_MAP(CZdemoView, CFormView)
- //{{AFX_MSG_MAP(CZdemoView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- ON_WM_CTLCOLOR()
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CZdemoView construction/destruction
-
- CZdemoView::CZdemoView() :CFormView(IDD_MAIN )
- {
- // TODO: add construction code here
- }
-
- CZdemoView::~CZdemoView()
- {
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CZdemoView drawing
-
- void CZdemoView::OnDraw(CDC* pDC)
- {
- CZdemoDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- SetDlgItemText( IDC_FILE, CurrentZipFile ); // write the value of the current zip file
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CZdemoView diagnostics
-
- #ifdef _DEBUG
- void CZdemoView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CZdemoView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CZdemoDoc* CZdemoView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CZdemoDoc)));
- return (CZdemoDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CZdemoView message handlers
-
- HBRUSH CZdemoView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
- {
- CFormView::OnCtlColor( pDC, pWnd, nCtlColor);
- pDC->SetBkMode(TRANSPARENT);
- return (HBRUSH)GetStockObject( LTGRAY_BRUSH); // it' s nicer!
- }